package br.com.bringme.models;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;

import br.com.bringme.mvc.Model;

@Entity
@Table(name = "bring_me.telefones")
@SequenceGenerator(name = "telefone_seq", sequenceName = "bring_me.enderecos_id_endereco_seq")
public class Telefone extends Model {

	@Id
	@GeneratedValue(generator = "telefone_seq", strategy = GenerationType.AUTO)
	@Column(name = "id_telefone")
	private Integer id;

	private String numero;

	public Integer getId() {
		return id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	public String getNumero() {
		return numero;
	}

	public void setNumero(String numero) {
		this.numero = numero;
	}
	
	@Override
	public int hashCode() {
		return String.valueOf(numero).hashCode();
	}

	@Override
	public String toString() {
		return "Telefone [id=" + id + ", numero=" + numero + "]";
	}
	
	

}
